﻿#ifndef USERS_H
#define USERS_H

#include <QString>
#include <QDataStream>

class User
{
public:
    QString username;
    QString password;

    // 重载QDataStream的读写操作符
    friend QDataStream& operator<<(QDataStream& out, const User& user)
    {
        out << user.username << user.password;
        return out;
    }

    friend QDataStream& operator>>(QDataStream& in, User& user)
    {
        in >> user.username >> user.password;
        return in;
    }
};

#endif // USERS_H
